package com.cargohu.aishouyu.operation.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cargohu.aishouyu.operation.entity.AppNotice;
import com.cargohu.aishouyu.operation.req.AppNoticeRequest;
import com.cargohu.aishouyu.operation.resp.AppNoticeDetailVo;
import com.cargohu.aishouyu.operation.resp.AppNoticeResponse;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * APP公告 Mapper 接口
 *
 * @author yww
 * @since 2023-11-29
 */
@Mapper
public interface AppNoticeMapper extends BaseMapper<AppNotice> {

    /**
     * APP公告详情
     *
     * @param id
     * @return
     */
    AppNoticeDetailVo getAppNoticeById(Long id);

    /**
     * APP最新公告详情
     *
     * @return
     * @throws Exception
     */
    AppNoticeDetailVo getLatestAppNotice();

    /**
     * APP公告分页列表
     *
     * @param appNoticeRequest
     * @return
     */
    List<AppNoticeResponse> getAppNoticeList(AppNoticeRequest appNoticeRequest);

}
